package com.dkha.common.enums;

/**
 * 性别枚举
 */
public enum SEXEnums {
    MAN("0", "男"),
    WOMAN("1", "女"),
    NOLIMIT("2", "保密");
    public String code;
    public String name;

    SEXEnums(String code, String name) {
        this.code = code;
        this.name = name;
    }
    public static SEXEnums getTypeByValue(String code)
    {
        if (null==code){
            return NOLIMIT;
        }
        for (SEXEnums enums : SEXEnums.values()) {
            if (enums.code.equals(code)) {
                return enums;
            }
        }
        return NOLIMIT;
    }

}
